package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.bizimpl.upmp.domain.UpmpRole;
import cc.rengu.redp.bizimpl.upmp.vo.UpmpRoleVO;
import cc.rengu.redp.common.domain.QueryRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author System
 */
public interface IUpmpRoleService extends IService<UpmpRole> {


    IPage<UpmpRole> findRoles(UpmpRoleVO role, QueryRequest request);

    List<UpmpRole> findUserRole(String userId);

    /**
     * 同法人行下根据角色名称查询数据
     * @param instId
     * @param roleName
     * @return
     */
    List<UpmpRole> findByName(String instId,String roleName);

    UpmpRole findById(String id);

    void createRole(UpmpRoleVO role);

    void deleteRoles(String[] roleIds) throws Exception;

    void updateRole(UpmpRoleVO role) throws Exception;

    List<UpmpRole> getAllRoles(UpmpRoleVO role);
}
